The present invention relates to the enhancement of digital image data captured by an image capture device and, in particular, to the adjustment of saturated color values in digitally captured image data.
A digital image capture device, such as a digital camera, employs an array of light detector cells or sensors for detecting the intensity of light reflected/transmitted from an image. For instance, a charge-coupled device (CCD) sensor includes an array of charge-coupled devices each detecting light intensity via charge stored in each CCD at a given location (referred to as the pixel location) in the image being captured. The light information detected by the sensors is then converted into digital image data.
There are two commonly known techniques for obtaining digital color images from an image capture device. The first technique uses a single sensor array having color filters positioned in front of each sensor cell in the array. Each color filter is of a specific type and selectively transmits one of a selected group of defined ranges of wavelengths in the visible spectrumxe2x80x94each specified spectral transmissivity corresponds to a filter type. The color filter types are arranged in a repeating multi-color pattern (called a mosaic) in front of the array of sensor cells. As a result, the digital data obtained from this sensor design includes a single color value for each pixel location in the image, with the color information provided by the value depending on the filter type at that pixel. This type of image data is referred to as mosaiced digital data. In order to obtain usable color digital data having multiple color values for each pixel location, the mosaiced image data is demosaiced. Demosaicing is performed by interpolating the color values in the mosaiced image data to generate multiple color values for each pixel location of the image.
The second technique for obtaining digital color images uses multiple, overlaid sensor arraysxe2x80x94each being differentially sensitive to a particular region of the visible spectrum and each region corresponding to a particular color. For instance, a red, a green, and a blue light sensitive array can be overlaid such that each sensor cell or location in the image capture device includes a red, a green, and a blue light sensitive detector. In this way, three intensity values are detected and three color values are obtained for each pixel location in the image thereby producing non-mosaiced digital data. Another technique for obtaining non-mosaiced digital image data is performed by using multiple sensor arrays, and splitting incoming light in multiple directions In still another known technique, a single sensor is used at each pixel location and the properties of a color filter associated with the entire sensor array are rapidly varied to obtain multiple color values at each pixel location thereby providing non-mosaiced image data.
In both cases of the mosaiced and non-mosaiced image data each color value is digitally represented by a range of possible color values depending on the number of bits used in the digital representation. For example, if eight bits (i.e., one byte) are used to digitally represent a color value, its value will range from zero to 255 (i.e., 28xe2x88x921).
When the color value equals the maximum value of the range (e.g., 255), it is referred to as being xe2x80x9csaturatedxe2x80x9d. In other words, for an eight bit digital representation, a saturated color value is represented by xe2x80x9c11111111xe2x80x9d. In this case, it is not possible to know whether the true color value of the captured image at that pixel location is greater than or equal to the detected saturated color value. As a result, color information may be lost at pixel locations having saturated color values thereby causing degradation of quality of the image color. For instance, if at a given pixel location one of the color values is saturated and the actual color value is higher, while the other color values at the same pixel location are not saturated, then the reproduced hue at that pixel location will be different than the actual image color. If this type of color degradation is exhibited at many pixel locations, the overall quality of the digital image can be greatly diminished.
Moreover, since saturation most often happens at highlighted areas of an image, which tend to be bright and achromatic, the resulting color errors can be very noticeable. Compounding the problem, different sensor types (for detecting different colors) may saturate at different light levels either because of differences in gain or because the scene illuminant has a strong color cast. In these situations, since the red, green, and blue sensors do not saturate at the same time, serious color errors can result.
Accordingly, there is a need for a technique and apparatus for reducing the severity of color errors caused by sensor saturation.
The present invention is a method and system thereof of adjusting a saturated color value in a digital color image representation by estimating a true color value for the saturated color value. According to the method and system thereof, a first statistical distribution of color values associated with all pixel locations in the digital image data is obtained that represents the probability of an image capture device capturing color values of an particular set of color types or, in other words, the probability of captured responses of an image capture device. A saturated color value and its corresponding pixel location is detected in the digital image data. A second statistical distribution that represents a distribution of possible true color values for the detected saturated color value is derived from the first distribution based on the other color values at the detected saturated pixel location. The mean of the second distribution provides an estimate of the true color value for adjusting the detected saturated color value.
In one embodiment, the first statistical distribution is obtained by assuming that it is a multivariate normal distribution that can be parameterized by a mean vector and a covariance matrix estimated from the pixel locations with non-saturated color values in the digital image. In an alternative embodiment, the first distribution is obtained by assuming that it is a non-normal distribution with parameters estimated from the pixel locations with non-saturated color values in the digital image.
In still another embodiment, the parameters defining the first statistical distribution are determined by measuring the spectral sensitivities of the image capture device, the assumed scene illuminant (or illuminants), and a collection of object surface reflectance. The first distribution of color values is then obtained by calculating the camera""s responses to the collection of surfaces illuminated by the assumed scene illuminant (or illuminants).